<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog',array(
    'id'=>'popupX',
    'themeUrl'=>Yii::app()->theme->baseUrl . '/jui-themes',
    'theme'=>Yii::app()->params['juiTheme'],
    'options'=>array(
        'title'=>Yii::t('site','View Online Help: {title}',array('{title}'=>$data->title)),
        'autoOpen'=>true,
        'modal'=>'true',
        'width'=>'auto',
        'height'=>'auto',
    ),
)); ?>
<div class="wikiPage">
    <?php if(!isset($show_content) and trim($data->content)!=='') : ?>
    <p>
        <?php echo '&nbsp;&nbsp;&rArr;&nbsp;'.CHtml::link(Yii::t('site','Read more...'),array('/wikiPage/view','id'=>$data->id,'WikiPage[show_content]'=>1)); ?>
    </p>
    <?php else : ?>
    <div class="content">
        <?php
            $this->beginWidget('CMarkdown', array('purifyOutput'=>true));
            $content = preg_replace(array("/_ICON_NEW_/","/_ICON_EDIT_/","/_ICON_VIEW_/","/_ICON_DELETE_/"),array(ICON_NEW,ICON_EDIT,ICON_VIEW,ICON_DELETE),$data->content);
            echo $content;
            $this->endWidget();
        ?>
    </div>
    <?php endif; ?>
</div>

<?php $this->endWidget('zii.widgets.jui.CJuiDialog'); ?>

<div class="flash-notice note">
<p class="title"><?php echo Yii::t('site','Note:'); ?></p>
<?php echo Yii::t('site','Press ESC to close this dialog'); ?>
</div>
